import request from '@/utils/request'

export const login = (data) => {
  return request({
    url: '/v1_0/authorizations',
    method: 'post',
    data
  })
}
export const userInfo = () => {
  return request({
    url: '/v1_0/user/profile',
  })
}
export const editUserInfo = (data) => {
  return request({
    url: '/v1_0/user/profile',
    method:'patch',
    data
  })
}
// 封装一个修改用户头像的接口
export const changeUserPhoto = (data) => {

  return request({
      url: '/v1_0/user/photo',
      method: 'patch',
      data
  })
}